package com.asion.qkan.ui.fragment;


import android.support.design.widget.TabLayout;
import android.support.v4.view.ViewPager;

import com.asion.qkan.R;
import com.asion.qkan.adapter.AllAdapter;

import java.util.Arrays;

import butterknife.BindView;


public class CategoryFragment extends BaseFragment{

    @BindView(R.id.category_tablayout)
    TabLayout tabLayout;
    @BindView(R.id.category_viewpager)
    ViewPager viewPager;
    private  String[] titles = {"全部","恋爱","爆笑","奇幻","恐怖","耽美","剧情","成人","日常","治愈","百合","三次元"};

    @Override
    protected int getLayoutResource() {
        return R.layout.fragment_category;
    }

    @Override
    public void initPresenter() {

    }

    @Override
    protected void initView() {
        viewPager.setAdapter(new AllAdapter(getChildFragmentManager(),Arrays.asList(titles)));
        tabLayout.setupWithViewPager(viewPager);
    }
}
